package com.zhihua.interview.merge.controller;

import com.zhihua.interview.merge.service.ISaveService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class SaveController {

    @Autowired
    public ISaveService ISaveService;

    @PostMapping("/save")
    @ResponseBody
    @ApiOperation("保存订单")
    public String saveorder(String stocks) {
        int stock = ISaveService.saveorder(stocks);
        return "成功";
    }
}
